<!--#begin list -->
<link rel="stylesheet" type="text/css" href="ovidentia/skins/ovidentia/templates/addons/UNSCalendar/css/lectureUser.css" />

<div>
    <table align="center" border="0" cellpadding="5" cellspacing="0" width="100%">
        <tbody>

            <tr>
                <td class="BabSiteAdminTitleFontBackground" nowrap="nowrap" valign="middle" width="10%">{ lectureDateLabel }</td>
                <td class="BabSiteAdminTitleFontBackground" nowrap="nowrap" valign="middle" width="10%">{ materialLabel }</td>
                <td class="BabSiteAdminTitleFontBackground" nowrap="nowrap" valign="middle" width="10%">{ lectureTypeLabel }</td>
                <td class="BabSiteAdminTitleFontBackground" nowrap="nowrap" valign="middle" width="10%">{ lengthLabel }</td>
                <td class="BabSiteAdminTitleFontBackground" nowrap="nowrap" valign="middle" width="10%">{ tGLabel }</td>
                <td class="BabSiteAdminTitleFontBackground" nowrap="nowrap" valign="middle" width="10%">{ wPGLabel }</td>
            </tr>
            <!--#in nextLecture -->
            <tr>
                <td>{ lecture[lecture_startDate] }</td>
                <td>{ material[name] }</td>
                <td>{ lectureType[acronym] }</td>
                <td>{ lecture[lecture_lengthHour] }h{ lecture[lecture_lengthMin] }</td>
                <td>{ tGroup[name] }</td>
                <td>{ wPGroup[name] }</td>
            </tr>
            <!--#endin nextLecture -->

        </tbody>
    </table>

</div>

<!--#end list -->

<!--#begin add -->

<script>
    $(function() {
        $(".TD").hide();
        $(".TP").hide();
        
        $('#lectureType').change(function() {
            $('.TD, .TP').hide();
            $("."+$(this).find('option:selected').attr('id')).show();
        });
    });
</script>

<form name="addLecture" method="post" action="{ babPhpSelf }">
    <input type="hidden" name="tg" value="{ babAddonTarget }/user">
    <input type="hidden" name="idx" value="lecture">
    <input type="hidden" name="fid" value="{ idFormation }">

    <table width="50%" border="0" cellspacing="0" cellpadding="2" align="center">
        <tr>
            <td class="BabLoginCadreBackground" align="center" valign="middle">
                <table class="BabLoginMenuBackground" width="100%" border="0" cellspacing="0" cellpadding="2" align="center">
                    <tr> 
                        <td>{ materialLabel }<span class="mandatory_star" style="color:red">*</span>:</td>
                        <td>
                            <select name="materialID">
                                <option value="null">---</option>
                                <!--#in nextTeachingUnitS1 -->
                                <optgroup label="{ teachingUnitS1[teachingUnit_name] }">
                                    <!--#in nextMaterialS1 -->
                                    <option value="{ materialS1[id] }">{ materialS1[material_name] }</option>
                                    <!--#endin nextMaterialS1 -->
                                </optgroup>
                                <!--#endin nextTeachingUnitS1 -->
                            </select>
                        </td>
                    </tr>
                    <tr> 
                        <td>{ lectureTypeLabel }<span class="mandatory_star" style="color:red">*</span>:</td>
                        <td>
                            <select id="lectureType" name="lectureTypeID" onchange="LectureTypeSelect()">
                                <option value="null">---</option>
                                <!--#in nextLectureType -->
                                <option id="{ lectureType[acronym] }" value="{ lectureType[id] }">{ lectureType[name] }</option>
                                <!--#endin nextLectureType -->

                            </select>
                        </td>
                    </tr>
                    <tr class="TD"> 
                        <td>{ tutorialGroupLabel }<span class="mandatory_star" style="color:red">*</span>:</td>
                        <td>
                            <select name="tutorialGroupID">
                                <option value="">---</option>
                                <!--#in nextTutorialGroup -->
                                <option value="{ tutorialGroup[id] }">{ tutorialGroup[tutorialGroup_name] }</option>
                                <!--#endin nextTutorialGroup -->
                            </select>
                        </td>
                    </tr>
                    <tr class="TP"> 
                        <td>{ workPraticeGroupLabel }<span class="mandatory_star" style="color:red">*</span>:</td>
                        <td>
                            <select name="workPraticeGroupID">
                                <option value="">---</option>
                                <!--#in nextTutorialGroup -->
                                <optgroup label="{ tutorialGroup[tutorialGroup_name] }">
                                    <!--#in nextWorkPraticeGroup -->
                                    <option value="{ workPraticeGroup[id] }">{ workPraticeGroup[workPraticeGroup_name] }</option>
                                    <!--#endin nextWorkPraticeGroup -->
                                </optgroup>
                                <!--#endin nextTutorialGroup -->
                            </select>
                        </td>
                    </tr>
                    <tr> 
                        <td>{ dateLabel }<span class="mandatory_star" style="color:red">*</span>:</td>
                        <td>
                            <input type="text" name="startDate" id="datepicker"/>
                        </td>
                    </tr>
                    <tr> 
                        <td>{ hoursLabel }<span class="mandatory_star" style="color:red">*</span>:</td>
                        <td>
                            <select name="startHour">
                                <option value="">---</option>
                                <!--#in nextHour -->
                                <option value="{ hour }">{ hour }</option>
                                <!--#endin nextHour -->
                            </select> : 
                            <select name="startMin">
                                <option value="">---</option>
                                <!--#in nextMin -->
                                <option value="{ min }">{ min }</option>
                                <!--#endin nextMin -->
                            </select>
                        </td>
                    </tr>
                    <tr> 
                        <td>{ lengthLabel }<span class="mandatory_star" style="color:red">*</span>:</td>
                        <td>
                            <select name="lengthHour">
                                <option value="">---</option>
                                <!--#in nextLengthHour -->
                                <option>{ lengthHour }</option>
                                <!--#endin nextLengthHour -->
                            </select> : 
                            <select name="lengthMin">
                                <option value="">---</option>
                                <!--#in nextLengthMin -->
                                <option>{ lengthMin }</option>
                                <!--#endin nextLengthMin -->
                            </select>
                        </td>
                    </tr>

                    <tr> 
                        <td>{ classroomLabel }<span class="mandatory_star" style="color:red">*</span>:</td>
                        <td>
                            <select name="classroomID">
                                <option value="">---</option>
                                <!--#in nextBuilding -->
                                <optgroup label="{ building[name] }">
                                    <!--#in nextClassroom -->
                                    <option value="{ classroom[id] }">{ classroom[name] }</option>
                                    <!--#endin nextClassroom -->
                                </optgroup>
                                <!--#endin nextBuilding -->
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" align="center"><input type="submit" name="addLectureSubmit" value="{ addLectureButton }"></td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
</form>
<!--#end add -->

<!--#begin selectFormation -->
<form name="addLecture" method="post" action="{ babPhpSelf }">
    <input type="hidden" name="tg" value="{ babAddonTarget }/user">
    <input type="hidden" name="idx" value="lecture">

    <table width="50%" border="0" cellspacing="0" cellpadding="2" align="center">
        <tr>
            <td class="BabLoginCadreBackground" align="center" valign="middle">
                <table class="BabLoginMenuBackground" width="100%" border="0" cellspacing="0" cellpadding="2" align="center">
                    <tr>
                        <td>{ selectFormationLabel }<span class="mandatory_star" style="color:red">*</span>:</td>
                        <td>
                            <select name="fid">
                                <option value="">---</option>
                                <!--#in nextDepartment -->
                                <optgroup label="{ department[name] }">
                                    <!--#in nextFormation -->
                                    <option value="{ formation[id] }">{ formation[name] }</option>
                                    <!--#endin nextFormation -->
                                </optgroup>
                                <!--#endin nextDepartment -->
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" align="center"><input type="submit" name="selectFormationSubmit" value="{ submitButton }"></td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
</form>

<!--#end selectFormation -->